﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Modules/Master/main.master" AutoEventWireup="true" CodeFile="record.aspx.cs" Inherits="Modules_IA_record" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style>
        .bgimages {
            line-height:30px;
            height:30px;
            background-image:url(images/Mtopnav_hover.png);
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <form id="form1" runat="server">
        <br />
        <asp:Label ID="Label2" runat="server" Text="请选择查看方式："></asp:Label>
        <asp:DropDownList ID="DropDownList2" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DropDownList2_SelectedIndexChanged">
            <asp:ListItem>按操作区域查看</asp:ListItem>
            <asp:ListItem>按控制端查看</asp:ListItem>
            <asp:ListItem>查看所有操作</asp:ListItem>
        </asp:DropDownList>

        　<asp:Label ID="Label1" runat="server" Text="请选择操作区域："></asp:Label>
        <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" DataSourceID="SqlDataSource2" DataTextField="area" DataValueField="area" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged">
        </asp:DropDownList>

        　<asp:Label ID="Label3" runat="server" Text="请选择控制端:" Visible="False"></asp:Label>
        <asp:DropDownList ID="DropDownList3" runat="server" OnSelectedIndexChanged="DropDownList3_SelectedIndexChanged" AutoPostBack="True" Visible="False">
            <asp:ListItem Value="PC">桌面端</asp:ListItem>
            <asp:ListItem Value="APP">手机端</asp:ListItem>
            <asp:ListItem Value="WEB">网页端</asp:ListItem>
        </asp:DropDownList>
        <br />
        <br />
            <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" CellPadding="4" 
                DataSourceID="SqlDataSource5" ForeColor="Black" GridLines="Vertical" Width="100%" RowStyle-Height="25px" CssClass="txt-center" OnRowDataBound="GridView1_RowDataBound" PageSize="18">
                <AlternatingRowStyle BackColor="White" />
                <Columns>
                    <asp:BoundField DataField="area" HeaderText="操作区域" SortExpression="area" />
                    <asp:BoundField DataField="orderFrom" HeaderText="控制端" SortExpression="orderFrom" />
                    <asp:BoundField DataField="orderSend" HeaderText="控制指令" SortExpression="orderSend" />
                    <asp:BoundField DataField="instruction" HeaderText="控制说明" SortExpression="instruction" />
                    <asp:BoundField DataField="actionTime" HeaderText="控制时间" SortExpression="actionTime" />
                </Columns>
                <FooterStyle BackColor="#CCCC99" />
                <HeaderStyle CssClass="bgimages" Font-Bold="True" ForeColor="White" />
                <PagerSettings FirstPageText="第一页" LastPageText="最后一页" Mode="NextPreviousFirstLast" NextPageText="下一页" PreviousPageText="上一页"  />
                <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Center" />
                <RowStyle BackColor="#F7F7DE" />
                <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" CssClass="txt-center" />
                <SortedAscendingCellStyle BackColor="#FBFBF2" />
                <SortedAscendingHeaderStyle BackColor="#848384" />
                <SortedDescendingCellStyle BackColor="#EAEAD3" />
                <SortedDescendingHeaderStyle BackColor="#575357" />
            </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:smartGardenConnectionString %>" SelectCommand="SELECT [orderFrom], [area], [orderSend], [instruction], [actionTime] FROM [actionInstruction] WHERE ([area] = @area)">
            <SelectParameters>
                <asp:ControlParameter ControlID="DropDownList1" Name="area" PropertyName="SelectedValue" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:smartGardenConnectionString %>" SelectCommand="SELECT DISTINCT [area] FROM [dealReceive] ORDER BY [area]"></asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDataSource4" runat="server" ConnectionString="<%$ ConnectionStrings:smartGardenConnectionString %>" SelectCommand="SELECT [orderFrom], [area], [orderSend], [instruction], [actionTime] FROM [actionInstruction] WHERE ([orderFrom] = @orderFrom2) ORDER BY [actionTime] DESC">
            <SelectParameters>
                <asp:ControlParameter ControlID="DropDownList3" Name="orderFrom2" PropertyName="SelectedValue" Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDataSource5" runat="server" ConnectionString="<%$ ConnectionStrings:smartGardenConnectionString %>" SelectCommand="SELECT [orderFrom], [area], [orderSend], [instruction], [actionTime] FROM [actionInstruction] ORDER BY [actionTime] DESC"></asp:SqlDataSource>
        <br />
        <br />
    </form>
</asp:Content>

